package boot

import (
	"context"
	"fmt"

	"github.com/gogf/gf/v2/os/gcron"

	"github.com/beherochuling/beesoft_api/app/model"
)

func init() {
	cron()

	fmt.Println("AppBuildAt:", model.AppBuildAt)
	fmt.Println("BasePath:", model.BasePath)
	fmt.Println("BaseCodePath:", model.BaseCodePath)
}

func cron() {
	ctx := context.Background()

	_, err := gcron.Add(ctx, "0 10 0 * * *", func(ctx context.Context) {
		// go service.Sdk.Statistic(context.Background())
	})
	if err != nil {
		panic(err)
	}
}
